<?php

/***  DOCUMENTATION LAYER

	PHP Get-Activated Shell

	Last Update: Feb 2007
	Author: Tom at klenwell@gmail.com	

  NOTES

______________________________________________________________________________*/

// Timer
$_tx0 = microtime();

// Header
echo "<h1>PHP Shell : <a href=\"{$_SERVER['PHP_SELF']}\">reload</a></h1>";

// Dir Settings
$_DIR['root'] = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$_DIR['code'] = $_DIR['root'] . 'code/';

// Default Includes
#require_once($_DIR['code'] . 'common.inc.php');

// *** ON
if ( $_GET['test'] == 1 )
{

}

// *** OFF
else
{
	echo "<h2 style='font-weight:normal;'>to run: <a href='{$_SERVER['PHP_SELF']}?test=1'>?test=1</a></h2>";
}

// Footer
$_txn = microtime();
$stx = number_format(((substr($_txn,0,9)) + (substr($_txn,-10)) - (substr($_tx0,0,9)) - (substr($_tx0,-10))),4); 
$footer = <<<HTML
<h4 style="margin:0; position:absolute; top:6px; right:6px; font-family:monospace; color:#36f; padding:4px; border:1px solid #36f; font-weight:normal; background:#f3f6ff;">
script completed in $stx s
</h4>
HTML;
echo $footer;

?>
